package com.daylightrobbery.server.packet.login;

import com.daylightrobbery.server.packet.type.DataPacket;
import org.springframework.stereotype.Component;

@Component
public class LoginUdpServerRespPacket implements DataPacket {

    public static final String SUCCESS = "success";
    public static final String ERROR = "error";
    public static final String SERVER_INTERNAL_ERROR = "server internal error";

    private int type = 10002;

    private String uid;
    public String account;
    private String msg;
    public String getUid() {
        return uid;
    }

    public LoginUdpServerRespPacket setUid(String uid) {
        this.uid = uid;
        return this;
    }

    public String getAccount() {
        return account;
    }

    public LoginUdpServerRespPacket setAccount(String account) {
        this.account = account;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public LoginUdpServerRespPacket setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    @Override
    public DataPacket process() {
        return null;
    }

    @Override
    public int getType() {
        return this.type;
    }

    @Override
    public String toString() {
        return "LoginUdpServerRespPacket{" +
                "type=" + type +
                ", uid='" + uid + '\'' +
                ", account='" + account + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
